package com.lyf.scm.job.remote.facade;

import com.lyf.scm.common.enums.ResponseMsg;
import com.lyf.scm.job.remote.DemandPlanRemote;
import com.rome.arch.core.clientobject.Response;
import com.rome.arch.core.exception.RomeException;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 需求计划
 *
 * @author 李兵兵
 * @date 2020/09/08
 */
@Component
public class DemandPlanFacade {
    @Resource
    private DemandPlanRemote demandPlanRemote;

    public Response tidyData(){
        Response response = demandPlanRemote.tidyData();
        if(!ResponseMsg.SUCCESS.getCode().equals(response.getCode())){
            throw new RomeException(response.getCode(),response.getMsg());
        }
        return response;
    }
}
